package com.zhuchaooasystem.utils;

import android.content.Context;

import com.litesuits.orm.LiteOrm;
import com.zhuchaooasystem.base.App;

/**
 * Created by zhangyajiang on 2016/9/9.
 */
public class LiteDbUtils {
    private static LiteOrm liteOrm;

    public static synchronized LiteOrm getInstance() {
        if (liteOrm == null) {
            liteOrm = LiteOrm.newCascadeInstance(App.getAppContext(), "zhuchaomanage.db");

            liteOrm.setDebugged(true);
        }
        return liteOrm;
    }

    public static synchronized void init(Context context) {


        liteOrm = LiteOrm.newSingleInstance(context, "zhuchaomanage.db");


        liteOrm.setDebugged(true);

    }
}
